<%--@elvariable id="owner" type="com.flats.model.entity.Owner"--%>
<%@include file="header.jsp" %>
<%@include file="search.jsp" %>
<link rel="stylesheet" href="<c:url value="/css/ownerDetails.css" />">
<div id="owner-details">
    <div class="container-fluid well pull-left">
        <div class="row-fluid">
            <div class="pull-left">
                <img src="<%=request.getContextPath()%>/images/user-icon.jpg" class="img-circle">
            </div>

            <div class="user-info pull-left">
                <h3>${owner.user.name}</h3>
                <h6>Email: ${owner.user.email}</h6>
                <h6>Telephone: ${owner.user.telephone}</h6>
                <h6>Number of flat: ${owner.numberOfFlat}</h6>
            </div>
             <span class="rating-icons pull-right">
        <span class="rating-val">${owner.rating}</span><img class="img-star"
                                                src="<%=request.getContextPath()%>/images/icon_rating.png"/>
        <span class="btn-like"><img class="img-like" src="<%=request.getContextPath()%>/images/like.png"/></span>
        <span class="btn-dislike"><img class="img-dislike" src="<%=request.getContextPath()%>/images/dislike.png"/></span>
        </span>

        </div>
    </div>
</div>
<script>
    (function ($) {
        $(function () {
           $('.btn-like').on('click',function(){
                $rating.html(++rating_val);
                $(this).css("visibility","hidden");
                $('.btn-dislike').css("visibility","visible");

            });
            $('.btn-dislike').on('click',function(){
                $rating.html(--rating_val);
                $(this).css("visibility","hidden");
                $('.btn-like').css("visibility","visible");
            });
        });
    })(jQuery);
</script>
